package com.foxzzz.temporary;

public class Solution9 {
    public boolean isPalindrome(int x) {
        if(x<0)
            return false;
        int y=0;
        int z=x;
        while (z/10!=0){
            y=y*10+z%10;
            z=z/10;
        }
        y=y*10+z;
        return y==x;
    }

    public static void main(String[] args) {
        new Solution9().isPalindrome(121);
    }
}
